package com.zry.myRule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class myRule {
    @Bean
    public IRule myDiyRule(){
        //return new MyRandomRule(); // 自定义的负载均衡
        return new RoundRobinRule();
    }
}
